<?php

interface IUserDao {
	
	/**
	 * Simple fetch method.
	 * 
	 * @return Object[]
	 */
	function fetchUsers();
	
	/**
	 * Validates user credentials.
	 *
	 * @param String $username
	 * @param String $password
	 * @return int userId, or -1 if invalid login
	 */
	function validateUser($username, $password);
	
	/**
	 * Inserts user into database if possible.
	 *
	 * @param String $username
	 * @param String $password already MD5 hashed
	 * @param String $email
	 * @return int userId, or -1 if invalid username
	 */
	function addUser($username, $password, $email);
}

?>